
const {ccclass, property} = cc._decorator;

@ccclass
export default class Fllower extends cc.Component {

    @property(cc.Node)
    target: cc.Node = null;

    @property(cc.Rect)
    offset: cc.Rect = cc.rect();

    onLoad () {

    }

    start () {

    }

    update (dt:number) {
        //if(this.offset.contains(cc.v2(this.node.position))){
            this.node.position=this.target.position;
       // }
      
    }
}
